/*
** my_strcat.c for galaf in /home/compilation/galaf-lib
** 
** Made by christophe labonnemartinez
** Login   <labonn_c@epitech.net>
** 
** Started on  Fri Mar 23 07:32:09 2012 christophe labonnemartinez
** Last update Sat Aug 11 12:39:12 2012 christophe labonnemartinez
*/

#include "includes/my.h"

char	*my_strcat(char *dest, char *src)
{
  int	i;
  int	j;
  char	*r;

  i = 0;
  r = xmalloc(my_strlen(dest) + my_strlen(src) + 1);
  while (src[i])
    {
      r[i] = src[i];
      i++;
    }
  j = 0;
  i--;
  while (dest[j])
    {
      r[i] = dest[j];
      i++;
      j++;
    }
  r[i] = '\0';
  return (r);
}
